package com.action.gulimall.cart.config;

import com.action.gulimall.cart.interceptor.SetCookiesInterceptor;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author sl shilun217@qq.com
 * @Deacription 添加拦截器
 * @date 2021/06/25/16:13
 **/
@Component
public class WebConfig implements WebMvcConfigurer{

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new SetCookiesInterceptor());
    }
}
